import request from '@/utils/request'

// 查询模板字段列表
export function listField(query) {
  return request({
    url: '/publish/template/field/pageList',
    method: 'get',
    params: query
  })
}

// 查询模板字段详细
export function getFieId(fieldId) {
  return request({
    url: '/publish/template/field/' + fieldId,
    method: 'get'
  })
}

// 新增模板字段
export function addField(data) {
  return request({
    url: '/publish/template/field',
    method: 'post',
    data: data
  })
}

// 修改模板字段
export function updateField(data) {
  return request({
    url: '/publish/template/field',
    method: 'put',
    data: data
  })
}

// 删除模板字段
export function delField(fieldId) {
  return request({
    url: '/publish/template/field/delete/' + fieldId,
    method: 'delete'
  })
}
